/*
 * Copyright (c) 2006, 2022, webrx.cn All rights reserved.
 *
 */
package cn.webrx.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * <p>Project: smvc2022 - HomeController
 * <p>Powered by webrx On 2022-04-08 14:24:45
 * <p>Created by IntelliJ IDEA
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
@Controller @RequestMapping("home")
public class HomeController {
    @PostMapping("m1") @ResponseBody
    public String m1(){
        return "hello 中文效果";
    }

    @PostMapping("m2") @ResponseBody
    public String m2(int id, String name, @RequestHeader("token") String t){
        System.out.println(id);
        System.out.println(name);
        System.out.println("令牌:"+t);
        return "hello 中文效果";
    }
}
